package net.thumbtack.pages;

import net.thucydides.core.annotations.DefaultUrl;
import net.thucydides.core.pages.PageObject;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;


@DefaultUrl("http://82.200.2.19/activity/recent#_=_")

public class RecentActivityPage extends PageObject {


    @FindBy(className = "greeting")
    private  WebElement RecentElement;

   // public String word="Welcome back";

   public RecentActivityPage(WebDriver driver) {
        super(driver);
   }
    public void RecentElementt(String word) {
      word= element(RecentElement).getText();
        if (word!="NULL")
        {  word="Recent Activity is open";   }
            else word="Recent Activity isn't open";
    }                      }


//  public void should_opening_page()    {
   //   assertThat(RecentPage.isElementVisible(By.className("greeting")), is(true));
    // }
   /* private Converter<WebElement, String> toStrings() {
        return new Converter<WebElement, String>() {
            public String convert(WebElement from) {
                return from.getText();
            }
        };
    }
}        */


